package chan.project.manager;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.util.Map;
@SpringBootTest
public class test {

    @Resource
    private AmapManager amapManager;

    @Test
    public void test() {
        try {
            // 1、根据地址获取经纬度
            Map<String, String> lonAndLat = amapManager.getLonAndLat("三亚海滩");
            System.out.println("转换后经纬度为：" + lonAndLat);

            // 2、根据经纬度获取地址
//            String formattedAddress = getAMapByLngAndLat("116.577576", "40.300449", "45695c585b61ae87ef04986794299385");
//            System.out.println("转换后地址为：" + formattedAddress);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
